//
//  YFComposeTypeButton.swift
//  YFSwiftWeibo
//
//  Created by tsaievan on 2017/9/14.
//  Copyright © 2017年 tsaievan. All rights reserved.
//

import UIKit

class YFComposeTypeButton: UIControl {
    
    var clsName: String?
    
    @IBOutlet weak var iconImageView: UIImageView!

    @IBOutlet weak var titleLabel: UILabel!
    class func composeTypeButton(imageName: String, labelText: String)->YFComposeTypeButton {
        let nib = UINib(nibName: "YFComposeTypeButton", bundle: nil)
        let composeTypeButton = nib.instantiate(withOwner: nil, options: nil)[0] as! YFComposeTypeButton
        composeTypeButton.iconImageView.image = UIImage(named: imageName)
        composeTypeButton.titleLabel.text = labelText
        return composeTypeButton
    }
}
